﻿using AutoMapper;
using SC.GridManage.API.Write.Application.Command.LogicGrid;
using SC.GridManage.API.Write.Application.Command.PhysicalGrid;
using SC.GridManage.API.Write.Application.Command.UnitGrid;
using SC.GridManage.Domain.Models;

namespace SC.GridManage.API.Write
{
    public class GMAutoMapper : Profile
    {
        public GMAutoMapper()
        {
            //映射
            CreateMap<PhysicalGridModel,CreatePhysicalGridCommand>().ReverseMap();
            CreateMap<PhysicalGridModel,UpdatePhysicalGridCommand>().ReverseMap();//   -> PhysicalGridModel
            CreateMap<LogicGridModel, CreateLogicGirdCommand>().ReverseMap();  //->CreateLogicGirdCommand
            CreateMap<LogicGridModel, UpdLogicGridCommand>().ReverseMap();  //->UpdLogicGridCommand
            CreateMap<UnitGridModel, CreateUnitGridCommand>().ReverseMap();  //->CreateUnitGridCommand



        }
    }
}
